package com.xyz.rok.tools.service;

import com.xyz.rok.tools.model.Union;
import com.xyz.rok.tools.model.request.UnionRequest;

import java.util.List;

public interface UnionService {


    int deleteByPrimaryKey(Long id);

    int insert(Union record);

    int insertSelective(Union record);

    Union selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Union record);

    int updateByPrimaryKey(Union record);

    List<Union> selectUnionByUserId(Long userId);

    int selectUnionCountByUserId(Long userId);

    List<Union> selectUnionByServerId(Integer serverId);

    void joinUnion(UnionRequest unionRequest) throws Exception;

    void createUnion(UnionRequest unionRequest) throws Exception;

    int quitUnion(UnionRequest unionRequest) throws Exception;

    int deleteUnion(UnionRequest unionRequest);

    int updateUnion(UnionRequest unionRequest) throws Exception;
}
